Optimal. Leaf size=56 \[ \frac {a^2 \sin (e+f x)}{f}+\frac {b (4 a+b) \tanh ^{-1}(\sin (e+f x))}{2 f}+\frac {b^2 \tan (e+f x) \sec (e+f x)}{2 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {4147, 390, 385, 206} \[ \frac {a^2 \sin (e+f x)}{f}+\frac {b (4 a+b) \tanh ^{-1}(\sin (e+f x))}{2 f}+\frac {b^2 \tan (e+f x) \sec (e+f x)}{2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 385
Rule 390
Rule 4147
Rubi steps
\begin {align*} \int \cos (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (a+b-a x^2\right )^2}{\left (1-x^2\right )^2} \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {\operatorname {Subst}\left (\int \left (a^2+\frac {b (2 a+b)-2 a b x^2}{\left (1-x^2\right )^2}\right ) \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {a^2 \sin (e+f x)}{f}+\frac {\operatorname {Subst}\left (\int \frac {b (2 a+b)-2 a b x^2}{\left (1-x^2\right )^2} \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {a^2 \sin (e+f x)}{f}+\frac {b^2 \sec (e+f x) \tan (e+f x)}{2 f}+\frac {(b (4 a+b)) \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sin (e+f x)\right )}{2 f}\\ &=\frac {b (4 a+b) \tanh ^{-1}(\sin (e+f x))}{2 f}+\frac {a^2 \sin (e+f x)}{f}+\frac {b^2 \sec (e+f x) \tan (e+f x)}{2 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 80, normalized size = 1.43 \[ \frac {a^2 \sin (e) \cos (f x)}{f}+\frac {a^2 \cos (e) \sin (f x)}{f}+\frac {2 a b \tanh ^{-1}(\sin (e+f x))}{f}+\frac {b^2 \tanh ^{-1}(\sin (e+f x))}{2 f}+\frac {b^2 \tan (e+f x) \sec (e+f x)}{2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.67, size = 94, normalized size = 1.68 \[ \frac {{\left (4 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{2} \log \left (\sin \left (f x + e\right ) + 1\right ) - {\left (4 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{2} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, {\left (2 \, a^{2} \cos \left (f x + e\right )^{2} + b^{2}\right )} \sin \left (f x + e\right )}{4 \, f \cos \left (f x + e\right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.06, size = 78, normalized size = 1.39 \[ \frac {a^{2} \sin \left (f x +e \right )}{f}+\frac {2 a b \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{f}+\frac {b^{2} \sec \left (f x +e \right ) \tan \left (f x +e \right )}{2 f}+\frac {b^{2} \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2 f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 87, normalized size = 1.55 \[ -\frac {b^{2} {\left (\frac {2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 4 \, a b {\left (\log \left (\sin \left (f x + e\right ) + 1\right ) - \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 4 \, a^{2} \sin \left (f x + e\right )}{4 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.11, size = 55, normalized size = 0.98 \[ \frac {a^2\,\sin \left (e+f\,x\right )+\frac {b\,\mathrm {atanh}\left (\sin \left (e+f\,x\right )\right )\,\left (4\,a+b\right )}{2}-\frac {b^2\,\sin \left (e+f\,x\right )}{2\,\left ({\sin \left (e+f\,x\right )}^2-1\right )}}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{2} \cos {\left (e + f x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________